{{ with (.Params.sources) }}
    {{ if (not (eq (index . 0) "")) }}
      <div class="text-body-secondary font-italic border-top mt-5 pt-3 small">
        <p>{{ i18n "sources" }}:</p>
        <ul>
            {{ range . }}
              <li>
                  {{ if (hasPrefix . "http") }}
                      {{ $url := (urls.Parse .) }}
                      {{ $path := (delimit ((split ($url.Path) "/") | last 2) "/") }}
                      <a class="text-reset" href="{{ . }}" target="_blank" rel="noopener noreferrer nofollow">
                          {{ ($url.Host) }} {{ with ($path) }}({{ . }}){{ end }}
                      </a>
                  {{ else }}
                      {{ . }}
                  {{ end }}
              </li>
            {{ end }}
        </ul>
      </div>
    {{ end }}
{{ end }}
